// 模糊查询返回查询到的用户
var patient = [{
        name: '张三',
        number: '12345'
    },
    {
        name: '张三1',
        number: '123456'
    },
    {
        name: '张三2',
        number: '1234577'
    },
    {
        name: '张三44',
        number: '12345ww'
    }
]

Mock.mock('/pages/patIn/getPatientMoHu', 'post', function (e) {
    console.log('后端接收模糊查询参数：' + e.body)
    return patient
})



// 后端返回病人账单信息
var message = {
    name: '张三',
    number: 1234,
    sex: '女',
    age: 12,
    pay: [
        {
            payBianHao: 1,
            pills: [
              {
                  name: '阿司匹林',
                  number: '1221',
                  size: '一盒12粒',
                  money: '20.0',
                  unit: '粒',
                  num: '10',
                  totalMoney: '200.0'
              },
              {
                  name: '阿司匹林23',
                  number: '333',
                  size: '一盒19粒',
                  money: '27.0',
                  unit: '粒',
                  num: '10',
                  totalMoney: '270.0'
              }
           ],
          pillTotalMoney: '470.0',
          programs: [
              {
                  number: '1234',
                  name: '查肝',
                  unit: '次',
                  money: '120.0',
                  num: '1',
                  totalMoney: '120.0'
              },
              {
                  number: '123422',
                  name: '查血',
                  unit: '次',
                  money: '190.0',
                  num: '1',
                  totalMoney: '190.0'
              }
          ],
          programTotalMoney: '310.0',
          total: '780.0'
      },
      {     
            payBianHao: 2,
            pills: [
              {
                  name: '999感冒灵11',
                  number: '1221',
                  size: '一盒12粒',
                  money: '20.0',
                  unit: '粒',
                  num: '10',
                  totalMoney: '200.0'
              },
              {
                  name: '999感冒灵22',
                  number: '333',
                  size: '一盒19粒',
                  money: '27.0',
                  unit: '粒',
                  num: '10',
                  totalMoney: '270.0'
              }
           ],
          pillTotalMoney: '470.0',
          programs: [
              {
                  number: '111',
                  name: '查肝',
                  unit: '次',
                  money: '120.0',
                  num: '1',
                  totalMoney: '120.0'
              },
              {
                  number: '333',
                  name: '查血',
                  unit: '次',
                  money: '190.0',
                  num: '1',
                  totalMoney: '190.0'
              }
          ],
          programTotalMoney: '310.0',
          total: '780.0'
      }
      
    ]

}

Mock.mock('/pages/payIn/getPatientMessage', 'post', function (e) {
    console.log('后端接收身份证姓名参数：' + e.body)
    return message
})


// 后端返回账单提交信息
Mock.mock('/pages/payIn/PayIn', 'post', function (e) {
    console.log('后端接收支付参数：')
    console.log(e.body)
    var data = {success: '支付成功'}
    return data
})